package com.fr.web.platform.entry;

import com.fr.base.core.json.JSONException;
import com.fr.base.core.json.JSONObject;
import com.fr.schedule.dao.FieldMapper;
import com.fr.schedule.dao.ObjectMapper;

public class FileEntry extends BaseEntry
{
  public static final String TYPE_PREFIX = "1";
  public static final String TABLE_NAME = "fr_fileentry";
  public static final String PATH = "path";
  public static final int PATHTYPE = 4;
  private String path;
  public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper("fr_fileentry", new FieldMapper[] { new FieldMapper("id", 4, "id"), new FieldMapper("parentId", 4, "parent"), new FieldMapper("displayName", 12, "name"), new FieldMapper("description", 12, "description"), new FieldMapper("path", 12, "uri") });

  public FileEntry()
  {
  }

  public FileEntry(String paramString)
  {
    super(paramString);
  }

  public FileEntry(String paramString1, String paramString2, String paramString3)
  {
    super(paramString1, paramString2);
    this.path = paramString3;
  }

  public void setPath(String paramString)
  {
    this.path = paramString;
  }

  public String getPath()
  {
    return this.path;
  }

  public JSONObject createJSONConfig()
    throws JSONException
  {
    JSONObject localJSONObject = super.createJSONConfig();
    localJSONObject.put("path", getPath());
    return localJSONObject;
  }

  public boolean equals(Object paramObject)
  {
    if (!(paramObject instanceof FileEntry))
      return false;
    return super.equals(paramObject);
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    FileEntry localFileEntry = (FileEntry)super.clone();
    return localFileEntry;
  }

  public String getTypePrefix()
  {
    return "1";
  }

  public void parseJSON(JSONObject paramJSONObject)
    throws JSONException
  {
    super.parseJSON(paramJSONObject);
    setPath(paramJSONObject.getString("path"));
  }
}